From 157b4d044f9c5d413946977d94e5ba426f458b70 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 12 Apr 2001 12:13:19 +0000 Subject: [PATCH] (find_interval): Don't rebalance during signal handling. --- src/intervals.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/intervals.c b/src/intervals.c index 3e15a3cbf41..1dfc901a3ec 100644 --- a/src/intervals.c +++ b/src/intervals.c @@ -612,7 +612,8 @@ find_interval (tree, position) if (relative_position > TOTAL_LENGTH (tree)) abort (); /* Paranoia */ - tree = balance_possible_root_interval (tree); + if (!handling_signal) + tree = balance_possible_root_interval (tree); while (1) { @@ -720,7 +721,9 @@ previous_interval (interval) /* Find the interval containing POS given some non-NULL INTERVAL in the same tree. Note that we need to update interval->position - if we go down the tree. */ + if we go down the tree. + To speed up the process, we assume that the ->position of + I and all its parents is already uptodate. */ INTERVAL update_interval (i, pos) register INTERVAL i; -- 2.30.2